package com.rex.saas.enums;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * ErrorCodeEnum
 *
 * @author zhusiyu
 **/
@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public enum DeviceOptTypeEnum {

    /**
     *
     */
    GW_ON(1, "网关开启配网"),
    DEVICE_RPC(2, "向设备下发指令"),
    DEVICE_DELETE(3, "删除设备"),
    ;
    /**
     *
     */
    private int code;
    /**
     * 信息
     */
    private String message;

    public static Map<Integer, String> getList() {
        Map<Integer, String> map = new HashMap<>();
        for (DeviceOptTypeEnum deviceOptTypeEnum : values()) {
            map.put(deviceOptTypeEnum.getCode(), deviceOptTypeEnum.getMessage());
        }
        return map;
    }
}
